Skip to content

fix(vmm): give a simulated TDX guest the vm_config of a TDX guest - #1590

Merged
kvinwang merged 1 commit into
nextfrom
fix/vmm-simulated-tdx-vm-config
Nov 16, 2026
Merged

kvinwang merged 1 commit into
nextfrom
fix/vmm-simulated-tdx-vm-config

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

A guest deployed with simulated_tee = dstack-tdx runs with no_tee, so make_vm_config resolved it to the legacy TDX variant and attached no tdx_measurement. Its TEE simulator then reports placeholder measurements (MRTD 0x11…), and a KMS, which verifies the OS image of every key request, refuses it: the legacy path recomputes the MRs from the image.

Resolve the TDX attestation variant and attach the measurement document for a simulated TDX guest as for a TDX one, unless it has a swtpm: the lite ACPI measurement does not cover one (swtpm measurement is not supported), so such a guest keeps the placeholder measurements. The simulator already derives the lite measurements from the document, the way the verifier recomputes them.

Found by #841 on tdxlab: tc-gos-setup-009, tc-gos-attestatio-003, tc-gos-boot-and-i-003 and -004 failed with MRTD mismatch when the guest requested its keys from the case KMS.

Testing

A guest with simulated_tee = dstack-tdx runs without TDX, so its
vm_config resolved to the legacy variant and carried no tdx_measurement.
Its simulator then reports placeholder measurements, and a KMS, which
verifies the OS image of every key request, refuses it: the legacy path
recomputes the MRs from the image.

Resolve the TDX attestation variant and attach the measurement document
for a simulated TDX guest as for a TDX one, unless it has a swtpm: the
lite ACPI measurement does not cover one, so the simulator could not
derive its measurements.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the fix/vmm-simulated-tdx-vm-config branch from 18a6ae9 to a8c4e13 Compare November 15, 2026 20:44
kvinwang added a commit that referenced this pull request Nov 16, 2026
The harness pointed DSTACK_CCEL_FILE at the repository's sample CCEL. A
simulated TDX guest now takes the lite path (#1590), where the KMS checks
the ACPI table digests of the event log; the simulator patches them for
the guest's vm_config, the sample does not. Import the event log and
RTMR paths the simulator publishes in the systemd manager environment,
as the guest's own services get them.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang merged commit cc94e2a into next Nov 16, 2026
18 checks passed
@kvinwang
kvinwang deleted the fix/vmm-simulated-tdx-vm-config branch November 16, 2026 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant